package book;

import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: wangj
 * Date: 2022-02-28
 * Time: 20:51
 */
public class BookList {
    public Book[] bookList=new Book[20];
    private int usedSize;

    public BookList() {
        this.bookList[0] = new Book("三国演义","罗贯中",18,"小说");
        this.bookList[1] = new Book("西游记","吴承恩",38,"小说");
        this.bookList[2] = new Book("水浒传","施耐庵",28,"小说");
        this.bookList[3] = new Book("红楼梦","曹雪芹",48,"小说");
        this.usedSize = 4;
    }
//  获取pos位置的图书
    public Book getBookList(int pos) {
        return bookList[pos];
    }
    //  修改pos位置的图书
    public void setBookList(Book book,int pos) {
        this.bookList[pos] = book;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }


}
